<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@ page import="lib.db.admin.*"%>

<%
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");
	String admUsername = (String) session.getAttribute("adm.username");
	String admFullname = (String) session.getAttribute("adm.fullname");
	Admin adm = (Admin)session.getAttribute("adm.account");
	
	String contextPath = request.getContextPath();
	if (admUsername == null || "".equals(admUsername) || admFullname == null 
		|| "".equals(admFullname) || adm == null) {
		response.sendRedirect(contextPath + "/admin/login/login.jsp");
		return;
	}
%>	
<div class='menuBar'>
	<!-- Trang chủ -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Home');" onclick="return buttonClick(event, 'Home');" href="<%=request.getContextPath() %>/">
		<img style="padding-bottom: 3px; padding-left: 0;" src="<%=request.getContextPath() %>/admin/images/home.png" height="16px" align="absmiddle"/>
		Trang chủ
 	</A>
 	<!-- Giới thiệu -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Intro');"
			onclick="return buttonClick(event, 'Intro');" href="<%=request.getContextPath() %>/web-ban-hang.html">
			<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/intro.png" height="16px" align="absmiddle"/> 
			Giới thiệu
 	</A>
	<!-- Menu thanh toán -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Home Page');"
			onclick="return buttonClick(event, 'Home Page');" href=".">
			<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/icon-payment.png" height="16px" align="absmiddle"/> 
			Tài khoản
 	</A>
 	<DIV class="menu" id="Home Page" onMouseOver="menuMouseover(event)">
 		<A class="menuItem"
			href='<%=request.getContextPath() %>/withdraw/'>Rút tiền</A>
		<DIV class="menuItemSep"></DIV>
 		<A class="menuItem"
			href='<%=request.getContextPath() %>/recharge/'>Nạp tiền</A>
		<DIV class="menuItemSep"></DIV>
		<A class="menuItem"
			href='<%=request.getContextPath() %>/payment_log/config.jsp'>Cài đặt</A>
		<DIV class="menuItemSep"></DIV>		
	    <A class="menuItem"
			href='<%=request.getContextPath() %>/payment_log/history.jsp'>Lịch sử giao dịch</A>
	</DIV>
	<!-- Menu danh sách đăng ký -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Form đăng ký');"
			onclick="return buttonClick(event, 'Form đăng ký');" href=".">
			<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/form.png" height="16px" align="absmiddle"/> 
			Auto Responder
 	</A>
 	<DIV class="menu" id="Form đăng ký" onMouseOver="menuMouseover(event)">
		<A class="menuItem"
			href='<%=request.getContextPath() %>/form.jsp'>Form đăng ký</A>
		<DIV class="menuItemSep"></DIV>
		<A class="menuItem"
			href='<%=request.getContextPath() %>/form/squeeze.jsp'>Trang đăng ký</A>
		<DIV class="menuItemSep"></DIV>		
		<A class="menuItem"
		href='<%=request.getContextPath() %>/list_register.jsp'>Danh sách đăng ký</A>
		<DIV class="menuItemSep"></DIV>		
		<A class="menuItem"
			href='<%=request.getContextPath() %>/select_responder.jsp'>Email Responder</A>
	</DIV>
	
	<!-- AFFILIATE -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Affiliate');"
			onclick="return buttonClick(event, 'Affiliate');" href="<%=request.getContextPath() %>/affiliate/">	
		<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/affiliate.png" height="16px" align="absmiddle"/>		
		Affiliate
 	</A>
 	<!-- Market -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Market');"
			onclick="return buttonClick(event, 'Market');" href="<%=request.getContextPath() %>/market/">	
		<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/market.png" height="16px" align="absmiddle"/>		
		Chợ sản phẩm
 	</A>
	
	<!-- Menu bài học -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Bài học');"
			onclick="return buttonClick(event, 'Bài học');" href=".">
			<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/elearning.png" height="16px" align="absmiddle"/>
			E-learning
 	</A>
	<DIV class="menu" id="Bài học" onMouseOver="menuMouseover(event)">
	    <A class="menuItem"
			href='<%=request.getContextPath() %>/learning/class.jsp'>Lớp học</A>
		<DIV class="menuItemSep"></DIV>	
		<A class="menuItem"
			href='<%=request.getContextPath() %>/learning/course.jsp'>Khóa học</A>
		<DIV class="menuItemSep"></DIV>		
	    <A class="menuItem"
			href='<%=request.getContextPath() %>/learning/student.jsp'>Học viên</A>
	</DIV>
	
	<A class="menuButton" onMouseOver="buttonMouseover(event, 'Album');"
			onclick="return buttonClick(event, 'Album');" href=".">
			<img style="padding-bottom: 3px;" src="<%=request.getContextPath() %>/images/icon-album.png" height="16px" align="absmiddle"/>
			Nội dung
 	</A>
	<DIV class="menu" id="Album" onMouseOver="menuMouseover(event)">
	    <A class="menuItem"
			href='<%=request.getContextPath() %>/album/'>Album ảnh</A>
	</DIV>
	<!-- Menu User -->
	<A class="menuButton" onMouseOver="buttonMouseover(event, '<%=adm.getFullname() != null ? adm.getFullname() : adm.getUsername() %>');"
			onclick="return buttonClick(event, '<%=adm.getFullname() != null ? adm.getFullname() : adm.getUsername() %>');" 
			href="." style="float: right; margin-right: 15px;"> 
			<%=adm.getFullname() != null ? adm.getFullname() : adm.getUsername() %>
			<img src="<%=request.getContextPath() %>/admin/images/icon-dropdown.gif" height="16px" align="absmiddle"/>
 	</A>
	<DIV class="menu" id="<%=adm.getFullname() != null ? adm.getFullname() : adm.getUsername() %>" onMouseOver="menuMouseover(event)">
		<A class="menuItem"
			href='<%=request.getContextPath() %>/admin/login/change-pass.jsp'>Đổi mật khẩu</A>
		<DIV class="menuItemSep"></DIV>
	    <A class="menuItem"
			href='<%=request.getContextPath() %>/logout.jsp'>Thoát</A>
	</DIV>
</div>